home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nothing but Tetris
/
Nothing but Tetris.iso
/
amiga
/
wbtris_1.3
/
source
/
wbtris.h.pp
/
wbtris.h
Wrap
C/C++ Source or Header
|
2000-01-01
|
3KB
|
93 lines
#include "WBTRIS_Include.h"
#define VERSION " 1.3"
#define PROG_NAME "WBTRIS"
#define AUTHOR "Dirk B÷hmer und Ralf Pieper"
#define GD_HighscoreGadget 0
#define GD_ScoreGadget 1
#define GD_LevelGadget 2
#define GD_LineGadget 3
#define GD_PauseGadget 4
#define GD_StatGadget 5
#define GD_OptGadget 6
#define GD_NewGadget 7
#define GD_QuitGadget 8
/* Defines */
#define ABSTAND 2
#define MAINWINDOWLEFT 0
#define MAINWINDOWTOP 0
#define SPACE '\x40'
#define QUICKSPACE '\x44'
#define CURSOR_RIGHT '\x4e'
#define CURSOR_LEFT '\x4f'
#define CURSOR_DOWN '\x4d'
#define CURSOR_UP '\x4c'
#define DEFAULTTICKS 40
#define XSIZE 10
#define YSIZE 23
#define YOFFSET 20
#define MY_WIN_LEFT (20)
#define MY_WIN_TOP (10)
#define MY_WIN_WIDTH (337)
#define MY_WIN_HEIGHT (157)
#define FILENAME "WBTRIS.scores"
/* our function prototypes */
int wbmain(struct WBStartup *wbs);
int main(void);
int Real_Main(void);
void openall(void);
void closeall(void);
void closeout(UBYTE *errstring, LONG rc);
BOOL CollisionRight(struct obj *objptr, int field[YSIZE+1][XSIZE+2], int x, int y);
BOOL CollisionLeft (struct obj *objptr, int field[YSIZE+1][XSIZE+2], int x, int y);
BOOL CollisionDown(struct obj *objptr, int field[YSIZE+1][XSIZE+2], int x, int y);
void Draw_Object(struct RastPort *rp, int x, int y, struct obj *objptr, BOOL malen);
BOOL Rotate_Matrixr(struct obj *objptr, int field[YSIZE+1][XSIZE+2], int x, int y);
BOOL Rotate_Matrixl(struct obj *objptr, int field[YSIZE+1][XSIZE+2], int x, int y);
void Draw_Box(struct RastPort *rp, int x,int y, int color, int malen);
struct obj *RandomObject(void);
void DrawWindow(struct RastPort *rp);
void SetNewMatrix(struct obj *objptr, int field[YSIZE+1][XSIZE+2], int x, int y);
void CleanUp(struct RastPort *rp, int field[YSIZE+1][XSIZE+2]);
BOOL GameOver(struct RastPort *rp, int field[YSIZE+1][XSIZE+2],BOOL lockname);
void InitObjects(void);
void WaitForActivateWindow(struct RastPort *rp);
BOOL Pause(struct RastPort *rp, struct Window *window, int field[YSIZE+1][XSIZE+2]);
void NewGame(struct RastPort *rp, int field[YSIZE+1][XSIZE+2],BOOL vongameover, BOOL vonoptions);
void QuitGame(void);
BOOL InFirstLine(struct obj *objptr);
void Draw_NextObject(struct RastPort *rp, struct obj *objptr);
void ClearNextField(struct RastPort *rp);
void Enterhighscore(struct Window *window, int Score, int Rows);
struct Gadget *CreateAllGadgets(struct Screen *myscreen);
int Loadhiscore(void);
BOOL AskContinue(void);
void UpdateStatistic(int objnumber);
/* Hiscore.c */
void HiscoreList(char *Name, int Score, int Rows, int XOffset, int YOffset);
void OutHiscoreList(struct RastPort *rp);
void UpdateHiscore(char *Name, int Score, int Rows);
void AddSpaces(int n, char *s);
BOOL SaveFile(void);
void LoadFile(void);
/* Options.c */
int OpenOptionsWindow(void);
void CloseOptionsWindow( void );
void errorMessage(STRPTR error);
BOOL handleGadgetEvent(struct Window *win, struct Gadget *gad, UWORD code, struct Gadget *my_gads[]);
VOID process_window_events(struct Window *mywin, struct Gadget *my_gads[]);
void OpenOptions(WORD winxpos, WORD winypos);
/* Statistic.c */
void statistic(WORD WBTRIS_Window_Left, WORD WBTRIS_Window_Top, int ob1, int ob2, int ob3, int ob4, int ob5, int ob6, int ob7);
void DrawWin(struct Window *win,APTR VisualInfo);